package com.bfxy.base.rabbit.api;

import com.bfxy.base.rabbit.api.exception.MessageRunTimeException;

import java.util.List;

/**
 * 消息生产者
 * @author linxin
 */
public interface MessageProducer {
    /**
     * @param message 消息发送
     * @throws MessageRunTimeException some error occurs
     */
    void send(Message message) throws MessageRunTimeException;
    /**
     * @param message 批量消息发送
     * @throws MessageRunTimeException some error occurs
     */
    void send(List<Message> message) throws MessageRunTimeException;
    /**
     * 附带SendCallback回调执行响应的业务逻辑处理
     * @param message 消息
     * @throws MessageRunTimeException some error occurs
     */
    void send(Message message,SendCallback sendCallback) throws MessageRunTimeException;

}
